<template>
  <div class="home">
      <div>
        用户ID：<input v-model="userId" type="text" />
      </div>
      <div>
        房间ID：<input v-model="roomId" type="text" />
      </div>
      <div>
        <button @click="join">加入房间</button>
      </div>
      <trtc ref="trtc" :userId="userId" :roomId="roomId"></trtc>
  
  </div>
</template>

<script>

import trtc from '@/components/trtc/trtc'
export default {
  name: 'Home',
  components: {
    trtc
  },
  data () {
    return {
      userId: '',
      roomId: ''
    }
  },
  methods: {
    join(){
      this.$refs.trtc.createClient()
      this.$refs.trtc.join()
    }
  }
}
</script>
